//
//  PHAsset+AssetImage.h
//  Logistics
//
//  Created by 刘峰 on 2018/1/12.
//  Copyright © 2018年 com.Logistics. All rights reserved.
//

#import <Photos/Photos.h>

typedef void(^AssetImageBlock)(NSArray<UIImage *> *images);
typedef void(^AssetAlongBlock)(UIImage *image);
typedef void(^AssetLoadedBlock)(UIImage *image, BOOL isOriginal);

@interface PHAsset (AssetImage)


/**
 获取指定资源(PHAsset)数组 原图

 @param assets 资源(PHAsset)数组
 @param block  原图列表
 */
+ (void)getOriginalImagesWithAssets:(NSArray *)assets
                         AssetBlock:(AssetImageBlock)block;


/**
 获取原图（如需从iCloud下载）

 @param block 原图
 */
- (void)getOriginalImageLoadedBlock:(AssetAlongBlock)block;


- (void)getOriginalImageFromIClound:(AssetLoadedBlock)block;

/**
 获取缩略图

 @param imageSize 指定图片尺寸
 @param block 缩略图
 */
- (void)getThumbImageWithiMageSize:(CGSize)imageSize
                        AssetBlock:(AssetAlongBlock)block;



@end
